#ifndef _ALI_SAT2IP_H_
#define _ALI_SAT2IP_H_


typedef enum
{
    SAT2IP_DVBS_DEMODULATOR = 0,
    SAT2IP_DVBC_DEMODULATOR = 1,
    SAT2IP_DVBT_DEMODULATOR = 2,
    SAT2IP_DEMODULATOR,    
}DEMO_TYPE;

typedef enum
{
    SAT2IP_PROGRAM_RECORD = 0,
    SAT2IP_PID_RECORD,
    SAT2IP_TP_RECORD,
    SAT2IP_DB_RECORD,    
}STREAM_RECORD_TYPE;

typedef enum
{
    SAT2IP_ACTION_REQUEST_REC_PROGRAM = 0,
    SAT2IP_ACTION_REQUEST_REC_TP,
    SAT2IP_ACTION_REQUEST_REC_PID,
    SAT2IP_ACTION_STOP_RECORD,
    SAT2IP_ACTION_REQUEST_DB_ALL,
    SAT2IP_ACTION_DB_ABORT,
}SAT2IP_ACTION_TYPE;

typedef enum
{
    SAT2IP_RET_OK       = 0,
    SAT2IP_RET_UNKNOWN  = -1,
    SAT2IP_RET_ERROR    = -2,
    SAT2IP_RET_TPERROR  = -3,
    SAT2IP_RET_SATERROR = -4,
    SAT2IP_RET_PIDERROR = -5,
    SAT2IP_RET_SRC_ERROR = -6,
    SAT2IP_RET_SRC_LACK  = -7,
    SAT2IP_RET_TUNER_LACK  = -8,
    SAT2IP_RET_CRYPT_LACK  = -9,
    SAT2IP_RET_MAX_LIMIT  = -10,
}RETURN_REQUEST;


enum sat2ip_msys {
    msys_unknown = 0,
    msys_dvbs = 1,
    msys_dvbs2 = 2,
    msys_dvbt = 3,
    msys_dvbt2 = 4,
    msys_dvbc = 5,
};

enum sat2ip_mtype {
    mtype_unknown = 0,
    mtype_qpsk = 0x10,
    mtype_8psk = 0x11,
    mtype_4qam = 0x12, //dvbc modify
    mtype_16qam= 0x13,
    mtype_32qam= 0x14,
    mtype_64qam= 0x15,
    mtype_128qam= 0x16,    
    mtype_256qam= 0x17,
};

enum sat2ip_polarisation {
    polar_unknown = 0,
    polar_horizontal = 0x20,
    polar_vertical   = 0x21,
    polar_circular_left = 0x22,
    polar_circular_right = 0x23,
};

enum sat2ip_pilots {
    pilots_unknown = 0,
    pilots_off = 0x30,
    pilots_on = 0x31,
};



struct sat2ip_sat
{
    INT32 src;  
    INT32 fe;        
    INT32 sat_index;//for use sat2ip ali thick client,.
    BOOL  is_ali_client;//for use sat2ip ali thick client,.
};

struct sat2ip_tp
{
    INT32 freq;
    INT32 pol;
    INT32 symb_rate;
    DEMO_TYPE dm_type;
    char  mod_way;
};


struct satellite
{
    UINT16 name_len;
    UINT8  sat_name[2*(MAX_SERVICE_NAME_LENGTH + 1)];
};

struct tansponder
{
    INT32 freq;
    INT32 pol;
    INT32 symb_rate;
};


UINT8 *media_provider_retid_to_str(RETURN_REQUEST ret_code);

#endif //_ALI_SAT2IP_H_
